SlideShare a Scribd company logo
1 of 35
Download to read offline
#3




Professional JavaScript Development
             Creating Reusable Code
                             Doc. v. 0.1 - 26/03/09




              Wildan Maulana | wildan [at] tobethink.com
When developing code with other programmers, which is standard for most
corporate or team projects, it becomes fundamentally important to maintain
good authoring practices in order maintaom your sanity.

On the next slide, we're going to look at a number of ways in wich you can
clean up your code, organize ot better, and improve the quality so that others
can use it.
Standardizing Object-Oriented Code

    Prototypal Inheritance
•
    Classical Inheritance
•
    The Base Library
•
    The Prototype Library
•
Prototypal Inheritance
• Unlike inheritance in other Object-
  Oriented language, prototypes do not
  inherit their properties from other
  prototypes or other constructors; they
  inherit them from physical objects
Examples of Prototypal Inheritance
// Create the constructor for a Person object
function Person( name ) {
    this.name = name;
}

// Add a new method to the Person object
Person.prototype.getName = function() {
    return this.name;
};

// Create a new User object constructor
function User( name, password ) {
    // Notice that this does not support graceful overloading/inheritance
    // e.g. being able to call the super class constructor
    this.name = name;
    this.password = password;
};

// The User object inherits all of the Person object's methods
User.prototype = new Person();

// We add a method of our own to the User object
User.prototype.getPassword = function() {
    return this.password;
};
Classical Inheritance
     http://javascript.crockford.com/inheritance.html.

• Function.prototype.method: This serves as a simple way of attaching a
function to the prototype of a constructor. This particular clause works because all
constructors are functions, and thus gain the new “method” method.
• Function.prototyope.inherits: This function can be used to provide simple
single-parent inheritance. The bulk of the code in this function centers around
the ability to call this.uber('methodName') in any of your object methods,
and have it execute the parent object’s method that it’s overwriting.
This is one aspect that is not built into JavaScript’s inheritance model.
• Function.prototype.swiss: This is an advanced version of the .method()
function which can be used to grab multiple methods from a single parent object.
When used together with multiple parent objects, you can have a form of
functional, multiple inheritance.
// Create a new Person object constructor
function Person( name ) {
    this.name = name;
}

// Add a new method to the Person object
Person.method( 'getName', function(){
    return name;
});

// Create a new User object constructor
function User( name, password ) {
    this.name = name;
    this.password = password;
},

// Inherit all the methods from the Person object
User.inherits( Person );

// Add a new method to the User object
User.method( 'getPassword', function(){
    return this.password;
});

// Overwrite the method created by the Person object,
// but call it again using the uber function
User.method( 'getName', function(){
    return quot;My name is: quot; + this.uber('getName');
});
The Base Library
• http://dean.edwards.name/weblog/2006/03/base/
   – More examples : http://dean.edwards.name/base/
Examples of Dean Edwards’s Base Library for Simple Class Creation and Inheritanc
               // Create a new Person class
               var Person = Base.extend({
                   // The constructor of the Person class
                   constructor: function( name ) {
                       this.name = name;
                   },

                   A simple method of the Person class
                   getName: function() {
                       return this.name;
                   }
               });

               // Create a new  User class that inherits from the Person class
               var User = Person.extend({
                   // Create the User class constructor
                   constructor: function( name, password ) {
                       // which, in turn calls the parent classes' constructor method
                       this.base( name );
                       this.password = password;
                   },

                   // Create another, simple, method for the User
                   getPassword: function() {
                       return this.password;
                   }
               });
• Base.extend( ... );: This expression is used to create a
  new base constructor object. This function takes one
  property, a simple object containing properties and values,
  all of which are added to the object and used as its
  prototypal methods.
• Person.extend( ... );: This is an alternate version of the
  Base.extend() syntax. All constructors created using the
  .extend() method gain their own .extend() method, meaning
  that it’s possible to inherit directly from them. In Listing on
  the previouse slide you create the User constructor by
  inheriting directly from the original Person constructor.
• this.base();: Finally, the this.base() method is used to call
  a parent function that has been overridden. You’ll notice that
  this is rather different from the this.uber() function that
  Crockford’s classical library used, as you don’t need to
  provide the name of the parent function (which can help to
  really clean up and clarify your code). Of all the object-
  oriented JavaScript libraries, Base’s overridden parent
  method functionality is the best.
The Prototype Library
• http://prototype.conio.net/
Two Functions Used by Prototype to Simulate Object-Oriented JavaScript Code

              // Create a global object named 'Class'
              var Class = {
                  // it has a single function that creates a new object constructor
                  create: function() {

                      // Create an anonymous object constructor
                      return function() {
                          // This calls its own initialization method
                          this.initialize.apply(this, arguments);
                      }

                  }
              }

              // Add a static method to the Object object which copies
              // properties from one object to another
              Object.extend = function(destination, source) {
                  // Go through all of the properties to extend
                  for (property in source) {
                      // and add them to the destination object
                      destination[property] = source[property];
                  }

                  // return the modified object
                  return destination;
              }
Class.create(): This function simply returns an anonymous
•
    function wrapper that can be used as a constructor. This simple
    constructor does one thing: it calls and executes the initialize
    property of the object. This means that there should be, at the very
    least, an initialize property containing a function on your object;
    otherwise, the code will throw an exception.
    Object.extend(): This simply copies all properties from one object
•
    into another. When you use the prototype property of constructors
    you can devise a simpler form of inheritance (simpler than the
    default prototypal inheritance that’s available in JavaScript).
Examples of How Prototype Uses Object-Oriented Functions to Extend the Default
 Operations of a String in JavaScript
// Add additional methods to the String prototype
Object.extend(String.prototype, {
    // A new Strip Tags function that removes all HTML tags from the string
    stripTags: function() {
        return this.replace(/</?[^>]+>/gi, '');
                                                     // An example of the stripTags() method
    },
                                                     // You can see that it removes all the 
                                                     //HTML from the string
    // Converts a string to an array of characters
                                                     // and leaves us with a clean text­only string
    toArray: function() {
                                                     quot;<b><i>Hello</i>,
        return this.split('');
                                                        world!quot;.stripTags() == quot;Hello, world!quot;
    },
    // Converts quot;foo­barquot; text to quot;fooBarquot; 
                                                    // An example of toArray() method
   //'camel' text
                                                    // We get the fourth character in the string
    camelize: function() {
                                                    quot;abcdefgquot;.toArray()[3] == quot;dquot;
        // Break up the string on dashes
        var oStringList = this.split('­');
                                                    // An example of the camelize() method
                                                    // It converts the old string to the new format.
        // Return early if there are no dashes
                                                    quot;background­colorquot;.camelize() == quot;backgroundColorquot;
        if (oStringList.length == 1)
            return oStringList[0];

        // Optionally camelize the start of the string
        var camelizedString = this.indexOf('­') == 0
            ? oStringList[0].charAt(0).toUpperCase() + oStringList[0].substring(1)
            : oStringList[0];

        // Capitalize each subsequent portion
        for (var i = 1, len = oStringList.length; i < len; i++) {
            var s = oStringList[i];
            camelizedString += s.charAt(0).toUpperCase() + s.substring(1);
        }

        // and return the modified string
        return camelizedString;
    }
});
// Create a new Person object with dummy constructor
                                  var Person = Class.create();
Prototype’s Helper Functions
                                  // Copy the following functions into the Person prototype
for Creating Classes and
                                  Object.extend( Person.prototype, {
Implementing Simple Inheritance
                                      // The function called immediately by the Person constructor
                                      initialize: function( name ) {
                                          this.name = name;
                                      },

                                      // A simple function for the Person object
                                      getName: function() {
                                          return this.name;
                                      }

                                  });

                                  // Create a new User object with a dummy constructor
                                  var User = Class.create();

                                  // The User object inherits all the functions of its parent class
                                  User.prototype = Object.extend( new Person(), {

                                      // Overwrite the old initialize function with the new one
                                      initialize: function( name, password ) {
                                          this.name = name;
                                          this.password = password;
                                      },

                                      // and add a new function to the object
                                      getPassword: function() {
                                          return this.password;
                                      }

                                  });
Packaging
• Namespacing
• Cleaning Up Your Code
• Compression
Namespacing
• An important but simple technique
  that you can use to clean up and
  simplify your code is the concept of
  namespacing
Namespacing in JavaScript and How It’s Implemented

// Create a default, global, namespace
var YAHOO = {};

// Setup some child namespaces, using objects
YAHOO.util = {};

// Create the final namespace, which contains 
//a property with a function
YAHOO.util.Event = {
    addEventListener: function(){ ... }
};

// Call the function within that particular namespace
YAHOO.util.Event.addEventListener( ... )
Packaging and Namespacing in Dojo
          <html>
          <head>
              <title>Accordion Widget Demo</title>
              <!— Include the Dojo Framework ­­>
              <script type=quot;text/javascriptquot; src=quot;dojo.jsquot;></script>
              <!— Include the different Dojo Packages ­­>
              <script type=quot;text/javascriptquot;>
                  // Two different packages are imported and used to create
                  // an Accordian Container widget
                  dojo.require(quot;dojo.widget.AccordionContainerquot;);
                  dojo.require(quot;dojo.widget.ContentPanequot;);
              </script>
          </head>

          <body>
          <div dojoType=quot;AccordionContainerquot; labelNodeClass=quot;labelquot;>
              <div dojoType=quot;ContentPanequot; open=quot;truequot; label=quot;Pane 1quot;>
                  <h2>Pane 1</h2>
                  <p>Nunc consequat nisi vitae quam. Suspendisse sed nunc. Proin…</p>
              </div>
              <div dojoType=quot;ContentPanequot; label=quot;Pane 2quot;>
                  <h2>Pane 2</h2>
                  <p>Nunc consequat nisi vitae quam. Suspendisse sed nunc. Proin…</p>
              </div>
              <div dojoType=quot;ContentPanequot; label=quot;Pane 3quot;>
                  <h2>Pane 3</h2>
                  <p>Nunc consequat nisi vitae quam. Suspendisse sed nunc. Proin…</p>
              </div>
          </div>
          </body>
          </html>
Packaging and Namespacing Within the Yahoo UI Library

   <html>
   <head>
       <title>Yahoo! UI Demo</title>
       <!­­ Import the main Yahoo UI library ­­>
       <script type=quot;text/javascriptquot; src=quot;YAHOO.jsquot;></script>

       <!­­ Import the events package ­­>
       <script type=quot;text/javascriptquot; src=quot;event.jsquot;></script>

       <!­­ Use the imported Yahoo UI library ­­>
       <script type=quot;text/javascriptquot;>
           // All Yahoo events and utilities are contained within the YAHOO
           // namespace, and subdivided into smaller namespaces (like 'util')
           YAHOO.util.Event.addListener( 'button', 'click', function() {
               alert( quot;Thanks for clicking the button!quot; );
           });
       </script>
   </head>

   <body>
       <input type=quot;buttonquot; id=quot;buttonquot; value=quot;Click Me!quot;/>
   </body>
   </html>
Cleaning Up Your Code
• http:// www.jslint.com/
   JSLint has a set of built-in rules that spot pieces of
  code that could cause you or others problems
  later, developed by Douglas Crockford
• Some JSlint rules :
   – Variable declaration
   – != and == vs !== and ===
   – Blocks and brackets
   – Semicolons
Variable Declaration
• One smart requirement that JSLint puts forth is that all
  variables used in your program must be declared
  before they are used
   – not declare the variable first before use can cause
     confusion as to its actual scope

                  // Incorrect variable use
                  foo = 'bar';

                  // Correct variable delcaration
                  var foo;
                  ...
                  foo = 'bar';
!= and == vs. !== and ===

    A common mistake that developers are susceptible to is the lack of
•
    understanding of false values in JavaScript. In JavaScript, null, 0, ‘’,
    false, and undefined are all equal (==) to each other, since they all
    evaluate to false. This means that if you use the code test == 
    false, it will evaluate true if test is also undefined or equal to null,
    which may not be what you want
     This is where !== and === become useful. Both of these operators
•
    look at the explicit value of the variable (such as null), not just what
    it is equivalent to (such as false). JSLint requires that anytime you
    use != or == against a falselike value, you must use !== or ===
    instead
Examples of How != and == Differ from !== and ===



         // Both of these are true
         null == false
         0 == undefined

         // You should use !== or === instead
         null !== false
         false === false
Blocks and Brackets
• JSlint have a rule that single-line block cannot be used.
  Such as in if(), while() or for() statement


         // This code is legal, normal, Javascript
         if ( dog == cat )
         if ( cat == mouse )
         mouse = quot;cheesequot;;

         // JSLint requires that it be written like this:
         if ( dog == cat ) {
             if ( cat == mouse ) {
                 mouse = quot;cheesequot;;
             }
         }
Semicolons

Statements That Need to Have Semicolons



// Be sure to include semicolons at the end 
//of all statements, if you plan on
// compressing your Javascript code

var foo = 'bar';
var bar = function(){
    alert('hello');
};
bar();
Compression
• An essential aspect of JavaScript library distribution is the
  use of code compressors to save on bandwidth
• There are three types of javaScript compressors :
   – Compressors that simply remove all extraneous white
     space and comments, leaving nothing but the essential
     code.
   – Compressors that remove the white space and comments
     but also change all variable names to be smaller.
   – Compressors that do the previous, but also minimize the
     size of all words in your code, not just variable names.
• The compressor that going to discuss is :
   – JSMin : falls under first compressor
   – Packer : falls under the third
JSMin
• On online version can be found here :

  http://www.crockford.com/javascript/jsmin.html

• The next slide will give you a feel what
  happens to the code once it's been passed
  through JSMin
Code for Determining a User’s Browser

         // (c) 2001 Douglas Crockford
         // 2001 June 3
         // The ­is­ object is used to identify the browser.  Every browser edition
         // identifies itself, but there is no standard way of doing it, and some of
         // the identification is deceptive. This is because the authors of web
         // browsers are liars. For example, Microsoft's IE browsers claim to be
         // Mozilla 4. Netscape 6 claims to be version 5.

         var is = {
             ie:      navigator.appName == 'Microsoft Internet Explorer',
             java:    navigator.javaEnabled(),
             ns:      navigator.appName == 'Netscape',
             ua:      navigator.userAgent.toLowerCase(),
             version: parseFloat(navigator.appVersion.substr(21)) ||
                      parseFloat(navigator.appVersion),
             win:     navigator.platform == 'Win32'
         }
         is.mac = is.ua.indexOf('mac') >= 0;
         if (is.ua.indexOf('opera') >= 0) {
             is.ie = is.ns = false;
             is.opera = true;
         }
         if (is.ua.indexOf('gecko') >= 0) {
             is.ie = is.ns = false;
             is.gecko = true;
         }
A Compressed Copy of the Code in Previous Listing


// Compressed code
var is={ie:navigator.appName=='Microsoft Internet Explorer',java:
navigator.javaEnabled(),ns:navigator.appName=='Netscape',ua:
navigator.userAgent.toLowerCase(),version:parseFloat(
navigator.appVersion.substr(21))||parseFloat(navigator.appVersion),win:
navigator.platform=='Win32'} is.mac=is.ua.indexOf('mac')>=0;if(
is.ua.indexOf('opera')>=0){is.ie=is.ns=false;is.opera=true;}
if(is.ua.indexOf('gecko')>=0){is.ie=is.ns=false;is.gecko=true;}
Packer
• Packer is by far the most powerful JavaScript
  compressor available. Developed by Dean Edwards, it
  serves as a way to completely reduce the size of your
  code and expand and execute it again on the fly
• The code that Packer generates has a couple hundred
  bytes of overhead (in order to be able to extract itself),
  so it’s not perfect for extremely small code (JSMin
  would be better for that). However, for large files, it is
  absolutely perfect
• An online version of the script is available at :
  http://dean.edwards.name/packer/
Portion of Code Compressed Using Packer

eval(function(p,a,c,k,e,d){e=function(c){return 
c.toString(36)};if(!''.replace(/^/,
String)){while(c­­){d[c.toString(a)]=k[c]||
c.toString(a)}k=[(function(e){return
d[e]})];e=(function(){return'w+'});c=1};while(c­­)
{if(k[c]){p=p.replace(new
RegExp('b'+e(c)+'b','g'),k[c])}}return p}('u 
1={5:2.f=='t s
r',h:2.j(),4:2.f=='k',3:2.l.m(),n:7(2.d.o(p))||
7(2.d),q:2.g=='i'}1.
b=1.3.6('b')>=0;a(1.3.6('c')>=0)
{1.5=1.4=9;1.c=e}a(1.3.6('8')>=0){1.5=
1.4=9;1.8=e}',31,31,'|is|navigator|ua|ns|ie....
Distribution
• If you develop an interesting piece of
  code and wish to let the world use it
  however they wish, you can use
  service such as the JavaScript Archive
  Network (JSAN) - http://openjsan.org/
• If you create a plugin on a certain
  library such as jQuery, you can use
  the plugin repository that jQuery
  provided
Q&A
Reference
• Pro JavaScript Techniques, John Resig,
  Apress

More Related Content

What's hot

CSharp Advanced L05-Attributes+Reflection
CSharp Advanced L05-Attributes+ReflectionCSharp Advanced L05-Attributes+Reflection
CSharp Advanced L05-Attributes+ReflectionMohammad Shaker
 
Patterns for JVM languages - Geecon 2014
Patterns for JVM languages - Geecon 2014Patterns for JVM languages - Geecon 2014
Patterns for JVM languages - Geecon 2014Jaroslaw Palka
 
Writing code that writes code - Nguyen Luong
Writing code that writes code - Nguyen LuongWriting code that writes code - Nguyen Luong
Writing code that writes code - Nguyen LuongVu Huy
 
Fundamental JavaScript [UTC, March 2014]
Fundamental JavaScript [UTC, March 2014]Fundamental JavaScript [UTC, March 2014]
Fundamental JavaScript [UTC, March 2014]Aaron Gustafson
 
JavaScript Basics and Best Practices - CC FE & UX
JavaScript Basics and Best Practices - CC FE & UXJavaScript Basics and Best Practices - CC FE & UX
JavaScript Basics and Best Practices - CC FE & UXJWORKS powered by Ordina
 
Advanced javascript
Advanced javascriptAdvanced javascript
Advanced javascriptDoeun KOCH
 
How AngularJS Embraced Traditional Design Patterns
How AngularJS Embraced Traditional Design PatternsHow AngularJS Embraced Traditional Design Patterns
How AngularJS Embraced Traditional Design PatternsRan Mizrahi
 
PHP 5.3 Part 2 - Lambda Functions & Closures
PHP 5.3 Part 2 - Lambda Functions & ClosuresPHP 5.3 Part 2 - Lambda Functions & Closures
PHP 5.3 Part 2 - Lambda Functions & Closuresmelechi
 
Functional Javascript
Functional JavascriptFunctional Javascript
Functional Javascriptguest4d57e6
 
JavaScript - Chapter 10 - Strings and Arrays
 JavaScript - Chapter 10 - Strings and Arrays JavaScript - Chapter 10 - Strings and Arrays
JavaScript - Chapter 10 - Strings and ArraysWebStackAcademy
 
C# Advanced L03-XML+LINQ to XML
C# Advanced L03-XML+LINQ to XMLC# Advanced L03-XML+LINQ to XML
C# Advanced L03-XML+LINQ to XMLMohammad Shaker
 
Java script tutorial
Java script tutorialJava script tutorial
Java script tutorialDoeun KOCH
 
JavaScript - Chapter 6 - Basic Functions
 JavaScript - Chapter 6 - Basic Functions JavaScript - Chapter 6 - Basic Functions
JavaScript - Chapter 6 - Basic FunctionsWebStackAcademy
 
Intro to Javascript
Intro to JavascriptIntro to Javascript
Intro to JavascriptAnjan Banda
 

What's hot (20)

CSharp Advanced L05-Attributes+Reflection
CSharp Advanced L05-Attributes+ReflectionCSharp Advanced L05-Attributes+Reflection
CSharp Advanced L05-Attributes+Reflection
 
Patterns for JVM languages - Geecon 2014
Patterns for JVM languages - Geecon 2014Patterns for JVM languages - Geecon 2014
Patterns for JVM languages - Geecon 2014
 
Writing code that writes code - Nguyen Luong
Writing code that writes code - Nguyen LuongWriting code that writes code - Nguyen Luong
Writing code that writes code - Nguyen Luong
 
Javascript Design Patterns
Javascript Design PatternsJavascript Design Patterns
Javascript Design Patterns
 
Fundamental JavaScript [UTC, March 2014]
Fundamental JavaScript [UTC, March 2014]Fundamental JavaScript [UTC, March 2014]
Fundamental JavaScript [UTC, March 2014]
 
JavaScript Basics and Best Practices - CC FE & UX
JavaScript Basics and Best Practices - CC FE & UXJavaScript Basics and Best Practices - CC FE & UX
JavaScript Basics and Best Practices - CC FE & UX
 
Advanced javascript
Advanced javascriptAdvanced javascript
Advanced javascript
 
How AngularJS Embraced Traditional Design Patterns
How AngularJS Embraced Traditional Design PatternsHow AngularJS Embraced Traditional Design Patterns
How AngularJS Embraced Traditional Design Patterns
 
PHP 5.3 Part 2 - Lambda Functions & Closures
PHP 5.3 Part 2 - Lambda Functions & ClosuresPHP 5.3 Part 2 - Lambda Functions & Closures
PHP 5.3 Part 2 - Lambda Functions & Closures
 
Functional Javascript
Functional JavascriptFunctional Javascript
Functional Javascript
 
Java script
Java scriptJava script
Java script
 
JavaScript - Chapter 10 - Strings and Arrays
 JavaScript - Chapter 10 - Strings and Arrays JavaScript - Chapter 10 - Strings and Arrays
JavaScript - Chapter 10 - Strings and Arrays
 
C# Advanced L03-XML+LINQ to XML
C# Advanced L03-XML+LINQ to XMLC# Advanced L03-XML+LINQ to XML
C# Advanced L03-XML+LINQ to XML
 
Javascript functions
Javascript functionsJavascript functions
Javascript functions
 
Java script tutorial
Java script tutorialJava script tutorial
Java script tutorial
 
G pars
G parsG pars
G pars
 
Javascript basics
Javascript basicsJavascript basics
Javascript basics
 
Java script -23jan2015
Java script -23jan2015Java script -23jan2015
Java script -23jan2015
 
JavaScript - Chapter 6 - Basic Functions
 JavaScript - Chapter 6 - Basic Functions JavaScript - Chapter 6 - Basic Functions
JavaScript - Chapter 6 - Basic Functions
 
Intro to Javascript
Intro to JavascriptIntro to Javascript
Intro to Javascript
 

Viewers also liked

Social networks and the financial markets
Social networks and the financial marketsSocial networks and the financial markets
Social networks and the financial marketsMark Jones
 
David Kawami Flying Paper Dragon Models
David Kawami   Flying Paper Dragon ModelsDavid Kawami   Flying Paper Dragon Models
David Kawami Flying Paper Dragon ModelsGIA VER
 
κρητικό λεξιλόγιο
κρητικό λεξιλόγιοκρητικό λεξιλόγιο
κρητικό λεξιλόγιοGIA VER
 
οι αρχαιοι κυνικοι αντισθενησ
οι αρχαιοι κυνικοι αντισθενησοι αρχαιοι κυνικοι αντισθενησ
οι αρχαιοι κυνικοι αντισθενησGIA VER
 
Introduction to Hypervoice
Introduction to HypervoiceIntroduction to Hypervoice
Introduction to HypervoiceMartin Geddes
 
1187 what-happens-when-you-take-a-photo-at-the-right-angle-a-slideshow
1187 what-happens-when-you-take-a-photo-at-the-right-angle-a-slideshow1187 what-happens-when-you-take-a-photo-at-the-right-angle-a-slideshow
1187 what-happens-when-you-take-a-photo-at-the-right-angle-a-slideshowGIA VER
 
Koukouloforoi sistimatos
Koukouloforoi sistimatosKoukouloforoi sistimatos
Koukouloforoi sistimatosGIA VER
 
καταρ 2
καταρ 2καταρ 2
καταρ 2GIA VER
 
2010 Calendar With Frames
2010 Calendar With Frames2010 Calendar With Frames
2010 Calendar With FramesGIA VER
 
η μικρή σοφία
η μικρή σοφίαη μικρή σοφία
η μικρή σοφίαGIA VER
 
ο κόσμος σε όλες τις παραλλαγές και τα χρώματα
ο κόσμος σε όλες τις παραλλαγές και τα χρώματαο κόσμος σε όλες τις παραλλαγές και τα χρώματα
ο κόσμος σε όλες τις παραλλαγές και τα χρώματαGIA VER
 
The GLWQA: Deciding our priorities and bottom lines?
The GLWQA: Deciding our priorities and bottom lines?The GLWQA: Deciding our priorities and bottom lines?
The GLWQA: Deciding our priorities and bottom lines?Healthy Lakes, Healthy Lives
 
η σταχομαζωχτρα αλεξανδροσ παπαδιαμαντησ
η σταχομαζωχτρα   αλεξανδροσ παπαδιαμαντηση σταχομαζωχτρα   αλεξανδροσ παπαδιαμαντησ
η σταχομαζωχτρα αλεξανδροσ παπαδιαμαντησGIA VER
 
Using Online Tools for Effective Organizing - Jennifer Janssen
Using Online Tools for Effective Organizing - Jennifer JanssenUsing Online Tools for Effective Organizing - Jennifer Janssen
Using Online Tools for Effective Organizing - Jennifer JanssenHealthy Lakes, Healthy Lives
 
Restoration Successes: Healthy Beaches, Healthy Perceptions
Restoration Successes: Healthy Beaches, Healthy PerceptionsRestoration Successes: Healthy Beaches, Healthy Perceptions
Restoration Successes: Healthy Beaches, Healthy PerceptionsHealthy Lakes, Healthy Lives
 

Viewers also liked (20)

Social networks and the financial markets
Social networks and the financial marketsSocial networks and the financial markets
Social networks and the financial markets
 
David Kawami Flying Paper Dragon Models
David Kawami   Flying Paper Dragon ModelsDavid Kawami   Flying Paper Dragon Models
David Kawami Flying Paper Dragon Models
 
1
11
1
 
κρητικό λεξιλόγιο
κρητικό λεξιλόγιοκρητικό λεξιλόγιο
κρητικό λεξιλόγιο
 
οι αρχαιοι κυνικοι αντισθενησ
οι αρχαιοι κυνικοι αντισθενησοι αρχαιοι κυνικοι αντισθενησ
οι αρχαιοι κυνικοι αντισθενησ
 
Introduction to Hypervoice
Introduction to HypervoiceIntroduction to Hypervoice
Introduction to Hypervoice
 
1187 what-happens-when-you-take-a-photo-at-the-right-angle-a-slideshow
1187 what-happens-when-you-take-a-photo-at-the-right-angle-a-slideshow1187 what-happens-when-you-take-a-photo-at-the-right-angle-a-slideshow
1187 what-happens-when-you-take-a-photo-at-the-right-angle-a-slideshow
 
Koukouloforoi sistimatos
Koukouloforoi sistimatosKoukouloforoi sistimatos
Koukouloforoi sistimatos
 
καταρ 2
καταρ 2καταρ 2
καταρ 2
 
2010 Calendar With Frames
2010 Calendar With Frames2010 Calendar With Frames
2010 Calendar With Frames
 
Greek
GreekGreek
Greek
 
η μικρή σοφία
η μικρή σοφίαη μικρή σοφία
η μικρή σοφία
 
ο κόσμος σε όλες τις παραλλαγές και τα χρώματα
ο κόσμος σε όλες τις παραλλαγές και τα χρώματαο κόσμος σε όλες τις παραλλαγές και τα χρώματα
ο κόσμος σε όλες τις παραλλαγές και τα χρώματα
 
The GLWQA: Deciding our priorities and bottom lines?
The GLWQA: Deciding our priorities and bottom lines?The GLWQA: Deciding our priorities and bottom lines?
The GLWQA: Deciding our priorities and bottom lines?
 
η σταχομαζωχτρα αλεξανδροσ παπαδιαμαντησ
η σταχομαζωχτρα   αλεξανδροσ παπαδιαμαντηση σταχομαζωχτρα   αλεξανδροσ παπαδιαμαντησ
η σταχομαζωχτρα αλεξανδροσ παπαδιαμαντησ
 
1
11
1
 
1
11
1
 
Using Online Tools for Effective Organizing - Jennifer Janssen
Using Online Tools for Effective Organizing - Jennifer JanssenUsing Online Tools for Effective Organizing - Jennifer Janssen
Using Online Tools for Effective Organizing - Jennifer Janssen
 
Restoration Successes: Healthy Beaches, Healthy Perceptions
Restoration Successes: Healthy Beaches, Healthy PerceptionsRestoration Successes: Healthy Beaches, Healthy Perceptions
Restoration Successes: Healthy Beaches, Healthy Perceptions
 
1
11
1
 

Similar to Professional JavaScript Development - Creating Reusable Code

Bring the fun back to java
Bring the fun back to javaBring the fun back to java
Bring the fun back to javaciklum_ods
 
ActiveWeb: Chicago Java User Group Presentation
ActiveWeb: Chicago Java User Group PresentationActiveWeb: Chicago Java User Group Presentation
ActiveWeb: Chicago Java User Group Presentationipolevoy
 
SproutCore and the Future of Web Apps
SproutCore and the Future of Web AppsSproutCore and the Future of Web Apps
SproutCore and the Future of Web AppsMike Subelsky
 
Grails 0.3-SNAPSHOT Presentation WJAX 2006 English
Grails 0.3-SNAPSHOT Presentation WJAX 2006 EnglishGrails 0.3-SNAPSHOT Presentation WJAX 2006 English
Grails 0.3-SNAPSHOT Presentation WJAX 2006 EnglishSven Haiges
 
JavaOne 2008 - TS-5793 - Groovy and Grails, changing the landscape of Java EE...
JavaOne 2008 - TS-5793 - Groovy and Grails, changing the landscape of Java EE...JavaOne 2008 - TS-5793 - Groovy and Grails, changing the landscape of Java EE...
JavaOne 2008 - TS-5793 - Groovy and Grails, changing the landscape of Java EE...Guillaume Laforge
 
eXo SEA - JavaScript Introduction Training
eXo SEA - JavaScript Introduction TrainingeXo SEA - JavaScript Introduction Training
eXo SEA - JavaScript Introduction TrainingHoat Le
 
10 PHP Design Patterns #burningkeyboards
10 PHP Design Patterns #burningkeyboards10 PHP Design Patterns #burningkeyboards
10 PHP Design Patterns #burningkeyboardsDenis Ristic
 
Modern JavaScript Programming
Modern JavaScript Programming Modern JavaScript Programming
Modern JavaScript Programming Wildan Maulana
 
Perl Teach-In (part 2)
Perl Teach-In (part 2)Perl Teach-In (part 2)
Perl Teach-In (part 2)Dave Cross
 
Lightweight Webservices with Sinatra and RestClient
Lightweight Webservices with Sinatra and RestClientLightweight Webservices with Sinatra and RestClient
Lightweight Webservices with Sinatra and RestClientAdam Wiggins
 
All I Need to Know I Learned by Writing My Own Web Framework
All I Need to Know I Learned by Writing My Own Web FrameworkAll I Need to Know I Learned by Writing My Own Web Framework
All I Need to Know I Learned by Writing My Own Web FrameworkBen Scofield
 
TechkTalk #12 Grokking: Writing code that writes code – Nguyen Luong
TechkTalk #12 Grokking: Writing code that writes code – Nguyen LuongTechkTalk #12 Grokking: Writing code that writes code – Nguyen Luong
TechkTalk #12 Grokking: Writing code that writes code – Nguyen LuongGrokking VN
 
WWW:::Mechanize YAPC::BR 2008
WWW:::Mechanize YAPC::BR 2008WWW:::Mechanize YAPC::BR 2008
WWW:::Mechanize YAPC::BR 2008mvitor
 
Javascript Everywhere
Javascript EverywhereJavascript Everywhere
Javascript Everywhereelliando dias
 
Painless Javascript Unit Testing
Painless Javascript Unit TestingPainless Javascript Unit Testing
Painless Javascript Unit TestingBenjamin Wilson
 
Django - Framework web para perfeccionistas com prazos
Django - Framework web para perfeccionistas com prazosDjango - Framework web para perfeccionistas com prazos
Django - Framework web para perfeccionistas com prazosIgor Sobreira
 
Getting Started with Capistrano
Getting Started with CapistranoGetting Started with Capistrano
Getting Started with CapistranoLaunchAny
 

Similar to Professional JavaScript Development - Creating Reusable Code (20)

Bring the fun back to java
Bring the fun back to javaBring the fun back to java
Bring the fun back to java
 
ActiveWeb: Chicago Java User Group Presentation
ActiveWeb: Chicago Java User Group PresentationActiveWeb: Chicago Java User Group Presentation
ActiveWeb: Chicago Java User Group Presentation
 
OO in JavaScript
OO in JavaScriptOO in JavaScript
OO in JavaScript
 
SproutCore and the Future of Web Apps
SproutCore and the Future of Web AppsSproutCore and the Future of Web Apps
SproutCore and the Future of Web Apps
 
Grails 0.3-SNAPSHOT Presentation WJAX 2006 English
Grails 0.3-SNAPSHOT Presentation WJAX 2006 EnglishGrails 0.3-SNAPSHOT Presentation WJAX 2006 English
Grails 0.3-SNAPSHOT Presentation WJAX 2006 English
 
JavaOne 2008 - TS-5793 - Groovy and Grails, changing the landscape of Java EE...
JavaOne 2008 - TS-5793 - Groovy and Grails, changing the landscape of Java EE...JavaOne 2008 - TS-5793 - Groovy and Grails, changing the landscape of Java EE...
JavaOne 2008 - TS-5793 - Groovy and Grails, changing the landscape of Java EE...
 
eXo SEA - JavaScript Introduction Training
eXo SEA - JavaScript Introduction TrainingeXo SEA - JavaScript Introduction Training
eXo SEA - JavaScript Introduction Training
 
10 PHP Design Patterns #burningkeyboards
10 PHP Design Patterns #burningkeyboards10 PHP Design Patterns #burningkeyboards
10 PHP Design Patterns #burningkeyboards
 
Javascript Design Patterns
Javascript Design PatternsJavascript Design Patterns
Javascript Design Patterns
 
Modern JavaScript Programming
Modern JavaScript Programming Modern JavaScript Programming
Modern JavaScript Programming
 
Perl Teach-In (part 2)
Perl Teach-In (part 2)Perl Teach-In (part 2)
Perl Teach-In (part 2)
 
Lightweight Webservices with Sinatra and RestClient
Lightweight Webservices with Sinatra and RestClientLightweight Webservices with Sinatra and RestClient
Lightweight Webservices with Sinatra and RestClient
 
All I Need to Know I Learned by Writing My Own Web Framework
All I Need to Know I Learned by Writing My Own Web FrameworkAll I Need to Know I Learned by Writing My Own Web Framework
All I Need to Know I Learned by Writing My Own Web Framework
 
TechkTalk #12 Grokking: Writing code that writes code – Nguyen Luong
TechkTalk #12 Grokking: Writing code that writes code – Nguyen LuongTechkTalk #12 Grokking: Writing code that writes code – Nguyen Luong
TechkTalk #12 Grokking: Writing code that writes code – Nguyen Luong
 
Sinatra
SinatraSinatra
Sinatra
 
WWW:::Mechanize YAPC::BR 2008
WWW:::Mechanize YAPC::BR 2008WWW:::Mechanize YAPC::BR 2008
WWW:::Mechanize YAPC::BR 2008
 
Javascript Everywhere
Javascript EverywhereJavascript Everywhere
Javascript Everywhere
 
Painless Javascript Unit Testing
Painless Javascript Unit TestingPainless Javascript Unit Testing
Painless Javascript Unit Testing
 
Django - Framework web para perfeccionistas com prazos
Django - Framework web para perfeccionistas com prazosDjango - Framework web para perfeccionistas com prazos
Django - Framework web para perfeccionistas com prazos
 
Getting Started with Capistrano
Getting Started with CapistranoGetting Started with Capistrano
Getting Started with Capistrano
 

More from Wildan Maulana

Hasil Pendataan Potensi Desa 2018
Hasil Pendataan Potensi Desa 2018Hasil Pendataan Potensi Desa 2018
Hasil Pendataan Potensi Desa 2018Wildan Maulana
 
Double for Nothing? Experimental Evidence on an Unconditional TeacherSalary I...
Double for Nothing? Experimental Evidence on an Unconditional TeacherSalary I...Double for Nothing? Experimental Evidence on an Unconditional TeacherSalary I...
Double for Nothing? Experimental Evidence on an Unconditional TeacherSalary I...Wildan Maulana
 
Ketahanan Pangan #1 : Gerakan Sekolah Menanam Melon
Ketahanan Pangan #1 : Gerakan Sekolah Menanam MelonKetahanan Pangan #1 : Gerakan Sekolah Menanam Melon
Ketahanan Pangan #1 : Gerakan Sekolah Menanam MelonWildan Maulana
 
Pengembangan OpenThink SAS 2013-2014
Pengembangan OpenThink SAS 2013-2014Pengembangan OpenThink SAS 2013-2014
Pengembangan OpenThink SAS 2013-2014Wildan Maulana
 
ICA – AtoM : Retensi Arsip
ICA – AtoM : Retensi ArsipICA – AtoM : Retensi Arsip
ICA – AtoM : Retensi ArsipWildan Maulana
 
OpenThink Labs Workshop : Ketahanan Pangan Skala RT/RW
OpenThink Labs Workshop : Ketahanan Pangan Skala RT/RWOpenThink Labs Workshop : Ketahanan Pangan Skala RT/RW
OpenThink Labs Workshop : Ketahanan Pangan Skala RT/RWWildan Maulana
 
OpenThink Labs : Dengar Pendapat Komunitas ciliwung dengan kemen pu dan kemen...
OpenThink Labs : Dengar Pendapat Komunitas ciliwung dengan kemen pu dan kemen...OpenThink Labs : Dengar Pendapat Komunitas ciliwung dengan kemen pu dan kemen...
OpenThink Labs : Dengar Pendapat Komunitas ciliwung dengan kemen pu dan kemen...Wildan Maulana
 
PostgreSQL BootCamp : Manajemen Master Data dengan SkyTools
PostgreSQL BootCamp : Manajemen Master Data dengan SkyToolsPostgreSQL BootCamp : Manajemen Master Data dengan SkyTools
PostgreSQL BootCamp : Manajemen Master Data dengan SkyToolsWildan Maulana
 
Mensetup Google Apps sebagai IdP jenis openID dan Aplikasi Berbasis CakePHP ...
Mensetup Google Apps sebagai IdP jenis openID  dan Aplikasi Berbasis CakePHP ...Mensetup Google Apps sebagai IdP jenis openID  dan Aplikasi Berbasis CakePHP ...
Mensetup Google Apps sebagai IdP jenis openID dan Aplikasi Berbasis CakePHP ...Wildan Maulana
 
Mensetup Google Apps sebagai IdP jenis openID dan Wordpress sebagai Sp
Mensetup Google Apps sebagai IdP jenis openID dan Wordpress sebagai SpMensetup Google Apps sebagai IdP jenis openID dan Wordpress sebagai Sp
Mensetup Google Apps sebagai IdP jenis openID dan Wordpress sebagai SpWildan Maulana
 
Konfigurasi simpleSAMLphp dengan Google Apps Sebagai Identity Provider
Konfigurasi simpleSAMLphp  dengan Google Apps Sebagai Identity ProviderKonfigurasi simpleSAMLphp  dengan Google Apps Sebagai Identity Provider
Konfigurasi simpleSAMLphp dengan Google Apps Sebagai Identity ProviderWildan Maulana
 
Instalasi simpleSAMLphp sebagai Identity Provider (IdP)
Instalasi simpleSAMLphp sebagai Identity Provider (IdP)Instalasi simpleSAMLphp sebagai Identity Provider (IdP)
Instalasi simpleSAMLphp sebagai Identity Provider (IdP)Wildan Maulana
 
Instalasi dan Konfigurasi simpleSAMLphp
Instalasi dan Konfigurasi simpleSAMLphpInstalasi dan Konfigurasi simpleSAMLphp
Instalasi dan Konfigurasi simpleSAMLphpWildan Maulana
 
River Restoration in Asia and Connection Between IWRM and River Restoration
River Restoration in Asia and Connection Between IWRM and River RestorationRiver Restoration in Asia and Connection Between IWRM and River Restoration
River Restoration in Asia and Connection Between IWRM and River RestorationWildan Maulana
 
Optimasi Limpasan Air Limbah Ke Kali Surabaya (Segmen Sepanjang – Jagir) De...
Optimasi Limpasan Air Limbah  Ke Kali Surabaya (Segmen Sepanjang – Jagir)  De...Optimasi Limpasan Air Limbah  Ke Kali Surabaya (Segmen Sepanjang – Jagir)  De...
Optimasi Limpasan Air Limbah Ke Kali Surabaya (Segmen Sepanjang – Jagir) De...Wildan Maulana
 
Penilaian Siswa di Finlandia - Pendidikan Dasar
Penilaian Siswa di Finlandia - Pendidikan DasarPenilaian Siswa di Finlandia - Pendidikan Dasar
Penilaian Siswa di Finlandia - Pendidikan DasarWildan Maulana
 
Proyek Al-'Alaq : Electric Bicycles ; History, Characteristics, and Uses
Proyek Al-'Alaq : Electric Bicycles ; History, Characteristics, and UsesProyek Al-'Alaq : Electric Bicycles ; History, Characteristics, and Uses
Proyek Al-'Alaq : Electric Bicycles ; History, Characteristics, and UsesWildan Maulana
 
OpenThink SAS : Interaksi Antara Sekolah, Wali Kelas, Siswa dan Orang Tua
OpenThink SAS : Interaksi Antara Sekolah, Wali Kelas, Siswa dan Orang TuaOpenThink SAS : Interaksi Antara Sekolah, Wali Kelas, Siswa dan Orang Tua
OpenThink SAS : Interaksi Antara Sekolah, Wali Kelas, Siswa dan Orang TuaWildan Maulana
 
Menggunakan AlisJK : Equating
Menggunakan AlisJK : EquatingMenggunakan AlisJK : Equating
Menggunakan AlisJK : EquatingWildan Maulana
 

More from Wildan Maulana (20)

Hasil Pendataan Potensi Desa 2018
Hasil Pendataan Potensi Desa 2018Hasil Pendataan Potensi Desa 2018
Hasil Pendataan Potensi Desa 2018
 
Double for Nothing? Experimental Evidence on an Unconditional TeacherSalary I...
Double for Nothing? Experimental Evidence on an Unconditional TeacherSalary I...Double for Nothing? Experimental Evidence on an Unconditional TeacherSalary I...
Double for Nothing? Experimental Evidence on an Unconditional TeacherSalary I...
 
Ketahanan Pangan #1 : Gerakan Sekolah Menanam Melon
Ketahanan Pangan #1 : Gerakan Sekolah Menanam MelonKetahanan Pangan #1 : Gerakan Sekolah Menanam Melon
Ketahanan Pangan #1 : Gerakan Sekolah Menanam Melon
 
Pengembangan OpenThink SAS 2013-2014
Pengembangan OpenThink SAS 2013-2014Pengembangan OpenThink SAS 2013-2014
Pengembangan OpenThink SAS 2013-2014
 
ICA – AtoM : Retensi Arsip
ICA – AtoM : Retensi ArsipICA – AtoM : Retensi Arsip
ICA – AtoM : Retensi Arsip
 
OpenThink Labs Workshop : Ketahanan Pangan Skala RT/RW
OpenThink Labs Workshop : Ketahanan Pangan Skala RT/RWOpenThink Labs Workshop : Ketahanan Pangan Skala RT/RW
OpenThink Labs Workshop : Ketahanan Pangan Skala RT/RW
 
OpenThink Labs : Dengar Pendapat Komunitas ciliwung dengan kemen pu dan kemen...
OpenThink Labs : Dengar Pendapat Komunitas ciliwung dengan kemen pu dan kemen...OpenThink Labs : Dengar Pendapat Komunitas ciliwung dengan kemen pu dan kemen...
OpenThink Labs : Dengar Pendapat Komunitas ciliwung dengan kemen pu dan kemen...
 
PostgreSQL BootCamp : Manajemen Master Data dengan SkyTools
PostgreSQL BootCamp : Manajemen Master Data dengan SkyToolsPostgreSQL BootCamp : Manajemen Master Data dengan SkyTools
PostgreSQL BootCamp : Manajemen Master Data dengan SkyTools
 
Mensetup Google Apps sebagai IdP jenis openID dan Aplikasi Berbasis CakePHP ...
Mensetup Google Apps sebagai IdP jenis openID  dan Aplikasi Berbasis CakePHP ...Mensetup Google Apps sebagai IdP jenis openID  dan Aplikasi Berbasis CakePHP ...
Mensetup Google Apps sebagai IdP jenis openID dan Aplikasi Berbasis CakePHP ...
 
Mensetup Google Apps sebagai IdP jenis openID dan Wordpress sebagai Sp
Mensetup Google Apps sebagai IdP jenis openID dan Wordpress sebagai SpMensetup Google Apps sebagai IdP jenis openID dan Wordpress sebagai Sp
Mensetup Google Apps sebagai IdP jenis openID dan Wordpress sebagai Sp
 
Konfigurasi simpleSAMLphp dengan Google Apps Sebagai Identity Provider
Konfigurasi simpleSAMLphp  dengan Google Apps Sebagai Identity ProviderKonfigurasi simpleSAMLphp  dengan Google Apps Sebagai Identity Provider
Konfigurasi simpleSAMLphp dengan Google Apps Sebagai Identity Provider
 
Instalasi simpleSAMLphp sebagai Identity Provider (IdP)
Instalasi simpleSAMLphp sebagai Identity Provider (IdP)Instalasi simpleSAMLphp sebagai Identity Provider (IdP)
Instalasi simpleSAMLphp sebagai Identity Provider (IdP)
 
Instalasi dan Konfigurasi simpleSAMLphp
Instalasi dan Konfigurasi simpleSAMLphpInstalasi dan Konfigurasi simpleSAMLphp
Instalasi dan Konfigurasi simpleSAMLphp
 
River Restoration in Asia and Connection Between IWRM and River Restoration
River Restoration in Asia and Connection Between IWRM and River RestorationRiver Restoration in Asia and Connection Between IWRM and River Restoration
River Restoration in Asia and Connection Between IWRM and River Restoration
 
Optimasi Limpasan Air Limbah Ke Kali Surabaya (Segmen Sepanjang – Jagir) De...
Optimasi Limpasan Air Limbah  Ke Kali Surabaya (Segmen Sepanjang – Jagir)  De...Optimasi Limpasan Air Limbah  Ke Kali Surabaya (Segmen Sepanjang – Jagir)  De...
Optimasi Limpasan Air Limbah Ke Kali Surabaya (Segmen Sepanjang – Jagir) De...
 
Penilaian Siswa di Finlandia - Pendidikan Dasar
Penilaian Siswa di Finlandia - Pendidikan DasarPenilaian Siswa di Finlandia - Pendidikan Dasar
Penilaian Siswa di Finlandia - Pendidikan Dasar
 
Statistik Listrik
Statistik ListrikStatistik Listrik
Statistik Listrik
 
Proyek Al-'Alaq : Electric Bicycles ; History, Characteristics, and Uses
Proyek Al-'Alaq : Electric Bicycles ; History, Characteristics, and UsesProyek Al-'Alaq : Electric Bicycles ; History, Characteristics, and Uses
Proyek Al-'Alaq : Electric Bicycles ; History, Characteristics, and Uses
 
OpenThink SAS : Interaksi Antara Sekolah, Wali Kelas, Siswa dan Orang Tua
OpenThink SAS : Interaksi Antara Sekolah, Wali Kelas, Siswa dan Orang TuaOpenThink SAS : Interaksi Antara Sekolah, Wali Kelas, Siswa dan Orang Tua
OpenThink SAS : Interaksi Antara Sekolah, Wali Kelas, Siswa dan Orang Tua
 
Menggunakan AlisJK : Equating
Menggunakan AlisJK : EquatingMenggunakan AlisJK : Equating
Menggunakan AlisJK : Equating
 

Recently uploaded

Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 

Recently uploaded (20)

Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 

Professional JavaScript Development - Creating Reusable Code

  • 1. #3 Professional JavaScript Development Creating Reusable Code Doc. v. 0.1 - 26/03/09 Wildan Maulana | wildan [at] tobethink.com
  • 2. When developing code with other programmers, which is standard for most corporate or team projects, it becomes fundamentally important to maintain good authoring practices in order maintaom your sanity. On the next slide, we're going to look at a number of ways in wich you can clean up your code, organize ot better, and improve the quality so that others can use it.
  • 3. Standardizing Object-Oriented Code Prototypal Inheritance • Classical Inheritance • The Base Library • The Prototype Library •
  • 4. Prototypal Inheritance • Unlike inheritance in other Object- Oriented language, prototypes do not inherit their properties from other prototypes or other constructors; they inherit them from physical objects
  • 5. Examples of Prototypal Inheritance // Create the constructor for a Person object function Person( name ) {     this.name = name; } // Add a new method to the Person object Person.prototype.getName = function() {     return this.name; }; // Create a new User object constructor function User( name, password ) {     // Notice that this does not support graceful overloading/inheritance     // e.g. being able to call the super class constructor     this.name = name;     this.password = password; }; // The User object inherits all of the Person object's methods User.prototype = new Person(); // We add a method of our own to the User object User.prototype.getPassword = function() {     return this.password; };
  • 6. Classical Inheritance http://javascript.crockford.com/inheritance.html. • Function.prototype.method: This serves as a simple way of attaching a function to the prototype of a constructor. This particular clause works because all constructors are functions, and thus gain the new “method” method. • Function.prototyope.inherits: This function can be used to provide simple single-parent inheritance. The bulk of the code in this function centers around the ability to call this.uber('methodName') in any of your object methods, and have it execute the parent object’s method that it’s overwriting. This is one aspect that is not built into JavaScript’s inheritance model. • Function.prototype.swiss: This is an advanced version of the .method() function which can be used to grab multiple methods from a single parent object. When used together with multiple parent objects, you can have a form of functional, multiple inheritance.
  • 7. // Create a new Person object constructor function Person( name ) {     this.name = name; } // Add a new method to the Person object Person.method( 'getName', function(){     return name; }); // Create a new User object constructor function User( name, password ) {     this.name = name;     this.password = password; }, // Inherit all the methods from the Person object User.inherits( Person ); // Add a new method to the User object User.method( 'getPassword', function(){     return this.password; }); // Overwrite the method created by the Person object, // but call it again using the uber function User.method( 'getName', function(){     return quot;My name is: quot; + this.uber('getName'); });
  • 8. The Base Library • http://dean.edwards.name/weblog/2006/03/base/ – More examples : http://dean.edwards.name/base/
  • 9. Examples of Dean Edwards’s Base Library for Simple Class Creation and Inheritanc // Create a new Person class var Person = Base.extend({     // The constructor of the Person class     constructor: function( name ) {         this.name = name;     },     A simple method of the Person class     getName: function() {         return this.name;     } }); // Create a new  User class that inherits from the Person class var User = Person.extend({     // Create the User class constructor     constructor: function( name, password ) {         // which, in turn calls the parent classes' constructor method         this.base( name );         this.password = password;     },     // Create another, simple, method for the User     getPassword: function() {         return this.password;     } });
  • 10. • Base.extend( ... );: This expression is used to create a new base constructor object. This function takes one property, a simple object containing properties and values, all of which are added to the object and used as its prototypal methods. • Person.extend( ... );: This is an alternate version of the Base.extend() syntax. All constructors created using the .extend() method gain their own .extend() method, meaning that it’s possible to inherit directly from them. In Listing on the previouse slide you create the User constructor by inheriting directly from the original Person constructor. • this.base();: Finally, the this.base() method is used to call a parent function that has been overridden. You’ll notice that this is rather different from the this.uber() function that Crockford’s classical library used, as you don’t need to provide the name of the parent function (which can help to really clean up and clarify your code). Of all the object- oriented JavaScript libraries, Base’s overridden parent method functionality is the best.
  • 11. The Prototype Library • http://prototype.conio.net/
  • 12. Two Functions Used by Prototype to Simulate Object-Oriented JavaScript Code // Create a global object named 'Class' var Class = {     // it has a single function that creates a new object constructor     create: function() {         // Create an anonymous object constructor         return function() {             // This calls its own initialization method             this.initialize.apply(this, arguments);         }     } } // Add a static method to the Object object which copies // properties from one object to another Object.extend = function(destination, source) {     // Go through all of the properties to extend     for (property in source) {         // and add them to the destination object         destination[property] = source[property];     }     // return the modified object     return destination; }
  • 13. Class.create(): This function simply returns an anonymous • function wrapper that can be used as a constructor. This simple constructor does one thing: it calls and executes the initialize property of the object. This means that there should be, at the very least, an initialize property containing a function on your object; otherwise, the code will throw an exception. Object.extend(): This simply copies all properties from one object • into another. When you use the prototype property of constructors you can devise a simpler form of inheritance (simpler than the default prototypal inheritance that’s available in JavaScript).
  • 14. Examples of How Prototype Uses Object-Oriented Functions to Extend the Default Operations of a String in JavaScript // Add additional methods to the String prototype Object.extend(String.prototype, {     // A new Strip Tags function that removes all HTML tags from the string     stripTags: function() {         return this.replace(/</?[^>]+>/gi, ''); // An example of the stripTags() method     }, // You can see that it removes all the  //HTML from the string     // Converts a string to an array of characters // and leaves us with a clean text­only string     toArray: function() { quot;<b><i>Hello</i>,         return this.split('');    world!quot;.stripTags() == quot;Hello, world!quot;     },     // Converts quot;foo­barquot; text to quot;fooBarquot;  // An example of toArray() method    //'camel' text // We get the fourth character in the string     camelize: function() { quot;abcdefgquot;.toArray()[3] == quot;dquot;         // Break up the string on dashes         var oStringList = this.split('­'); // An example of the camelize() method // It converts the old string to the new format.         // Return early if there are no dashes quot;background­colorquot;.camelize() == quot;backgroundColorquot;         if (oStringList.length == 1)             return oStringList[0];         // Optionally camelize the start of the string         var camelizedString = this.indexOf('­') == 0             ? oStringList[0].charAt(0).toUpperCase() + oStringList[0].substring(1)             : oStringList[0];         // Capitalize each subsequent portion         for (var i = 1, len = oStringList.length; i < len; i++) {             var s = oStringList[i];             camelizedString += s.charAt(0).toUpperCase() + s.substring(1);         }         // and return the modified string         return camelizedString;     } });
  • 15. // Create a new Person object with dummy constructor var Person = Class.create(); Prototype’s Helper Functions // Copy the following functions into the Person prototype for Creating Classes and Object.extend( Person.prototype, { Implementing Simple Inheritance     // The function called immediately by the Person constructor     initialize: function( name ) {         this.name = name;     },     // A simple function for the Person object     getName: function() {         return this.name;     } }); // Create a new User object with a dummy constructor var User = Class.create(); // The User object inherits all the functions of its parent class User.prototype = Object.extend( new Person(), {     // Overwrite the old initialize function with the new one     initialize: function( name, password ) {         this.name = name;         this.password = password;     },     // and add a new function to the object     getPassword: function() {         return this.password;     } });
  • 16. Packaging • Namespacing • Cleaning Up Your Code • Compression
  • 17. Namespacing • An important but simple technique that you can use to clean up and simplify your code is the concept of namespacing
  • 18. Namespacing in JavaScript and How It’s Implemented // Create a default, global, namespace var YAHOO = {}; // Setup some child namespaces, using objects YAHOO.util = {}; // Create the final namespace, which contains  //a property with a function YAHOO.util.Event = {     addEventListener: function(){ ... } }; // Call the function within that particular namespace YAHOO.util.Event.addEventListener( ... )
  • 19. Packaging and Namespacing in Dojo <html> <head>     <title>Accordion Widget Demo</title>     <!— Include the Dojo Framework ­­>     <script type=quot;text/javascriptquot; src=quot;dojo.jsquot;></script>     <!— Include the different Dojo Packages ­­>     <script type=quot;text/javascriptquot;>         // Two different packages are imported and used to create         // an Accordian Container widget         dojo.require(quot;dojo.widget.AccordionContainerquot;);         dojo.require(quot;dojo.widget.ContentPanequot;);     </script> </head> <body> <div dojoType=quot;AccordionContainerquot; labelNodeClass=quot;labelquot;>     <div dojoType=quot;ContentPanequot; open=quot;truequot; label=quot;Pane 1quot;>         <h2>Pane 1</h2>         <p>Nunc consequat nisi vitae quam. Suspendisse sed nunc. Proin…</p>     </div>     <div dojoType=quot;ContentPanequot; label=quot;Pane 2quot;>         <h2>Pane 2</h2>         <p>Nunc consequat nisi vitae quam. Suspendisse sed nunc. Proin…</p>     </div>     <div dojoType=quot;ContentPanequot; label=quot;Pane 3quot;>         <h2>Pane 3</h2>         <p>Nunc consequat nisi vitae quam. Suspendisse sed nunc. Proin…</p>     </div> </div> </body> </html>
  • 20. Packaging and Namespacing Within the Yahoo UI Library <html> <head>     <title>Yahoo! UI Demo</title>     <!­­ Import the main Yahoo UI library ­­>     <script type=quot;text/javascriptquot; src=quot;YAHOO.jsquot;></script>     <!­­ Import the events package ­­>     <script type=quot;text/javascriptquot; src=quot;event.jsquot;></script>     <!­­ Use the imported Yahoo UI library ­­>     <script type=quot;text/javascriptquot;>         // All Yahoo events and utilities are contained within the YAHOO         // namespace, and subdivided into smaller namespaces (like 'util')         YAHOO.util.Event.addListener( 'button', 'click', function() {             alert( quot;Thanks for clicking the button!quot; );         });     </script> </head> <body>     <input type=quot;buttonquot; id=quot;buttonquot; value=quot;Click Me!quot;/> </body> </html>
  • 21. Cleaning Up Your Code • http:// www.jslint.com/ JSLint has a set of built-in rules that spot pieces of code that could cause you or others problems later, developed by Douglas Crockford • Some JSlint rules : – Variable declaration – != and == vs !== and === – Blocks and brackets – Semicolons
  • 22. Variable Declaration • One smart requirement that JSLint puts forth is that all variables used in your program must be declared before they are used – not declare the variable first before use can cause confusion as to its actual scope // Incorrect variable use foo = 'bar'; // Correct variable delcaration var foo; ... foo = 'bar';
  • 23. != and == vs. !== and === A common mistake that developers are susceptible to is the lack of • understanding of false values in JavaScript. In JavaScript, null, 0, ‘’, false, and undefined are all equal (==) to each other, since they all evaluate to false. This means that if you use the code test ==  false, it will evaluate true if test is also undefined or equal to null, which may not be what you want This is where !== and === become useful. Both of these operators • look at the explicit value of the variable (such as null), not just what it is equivalent to (such as false). JSLint requires that anytime you use != or == against a falselike value, you must use !== or === instead
  • 24. Examples of How != and == Differ from !== and === // Both of these are true null == false 0 == undefined // You should use !== or === instead null !== false false === false
  • 25. Blocks and Brackets • JSlint have a rule that single-line block cannot be used. Such as in if(), while() or for() statement // This code is legal, normal, Javascript if ( dog == cat ) if ( cat == mouse ) mouse = quot;cheesequot;; // JSLint requires that it be written like this: if ( dog == cat ) {     if ( cat == mouse ) {         mouse = quot;cheesequot;;     } }
  • 26. Semicolons Statements That Need to Have Semicolons // Be sure to include semicolons at the end  //of all statements, if you plan on // compressing your Javascript code var foo = 'bar'; var bar = function(){     alert('hello'); }; bar();
  • 27. Compression • An essential aspect of JavaScript library distribution is the use of code compressors to save on bandwidth • There are three types of javaScript compressors : – Compressors that simply remove all extraneous white space and comments, leaving nothing but the essential code. – Compressors that remove the white space and comments but also change all variable names to be smaller. – Compressors that do the previous, but also minimize the size of all words in your code, not just variable names. • The compressor that going to discuss is : – JSMin : falls under first compressor – Packer : falls under the third
  • 28. JSMin • On online version can be found here : http://www.crockford.com/javascript/jsmin.html • The next slide will give you a feel what happens to the code once it's been passed through JSMin
  • 29. Code for Determining a User’s Browser // (c) 2001 Douglas Crockford // 2001 June 3 // The ­is­ object is used to identify the browser.  Every browser edition // identifies itself, but there is no standard way of doing it, and some of // the identification is deceptive. This is because the authors of web // browsers are liars. For example, Microsoft's IE browsers claim to be // Mozilla 4. Netscape 6 claims to be version 5. var is = {     ie:      navigator.appName == 'Microsoft Internet Explorer',     java:    navigator.javaEnabled(),     ns:      navigator.appName == 'Netscape',     ua:      navigator.userAgent.toLowerCase(),     version: parseFloat(navigator.appVersion.substr(21)) ||              parseFloat(navigator.appVersion),     win:     navigator.platform == 'Win32' } is.mac = is.ua.indexOf('mac') >= 0; if (is.ua.indexOf('opera') >= 0) {     is.ie = is.ns = false;     is.opera = true; } if (is.ua.indexOf('gecko') >= 0) {     is.ie = is.ns = false;     is.gecko = true; }
  • 30. A Compressed Copy of the Code in Previous Listing // Compressed code var is={ie:navigator.appName=='Microsoft Internet Explorer',java: navigator.javaEnabled(),ns:navigator.appName=='Netscape',ua: navigator.userAgent.toLowerCase(),version:parseFloat( navigator.appVersion.substr(21))||parseFloat(navigator.appVersion),win: navigator.platform=='Win32'} is.mac=is.ua.indexOf('mac')>=0;if( is.ua.indexOf('opera')>=0){is.ie=is.ns=false;is.opera=true;} if(is.ua.indexOf('gecko')>=0){is.ie=is.ns=false;is.gecko=true;}
  • 31. Packer • Packer is by far the most powerful JavaScript compressor available. Developed by Dean Edwards, it serves as a way to completely reduce the size of your code and expand and execute it again on the fly • The code that Packer generates has a couple hundred bytes of overhead (in order to be able to extract itself), so it’s not perfect for extremely small code (JSMin would be better for that). However, for large files, it is absolutely perfect • An online version of the script is available at : http://dean.edwards.name/packer/
  • 32. Portion of Code Compressed Using Packer eval(function(p,a,c,k,e,d){e=function(c){return  c.toString(36)};if(!''.replace(/^/, String)){while(c­­){d[c.toString(a)]=k[c]|| c.toString(a)}k=[(function(e){return d[e]})];e=(function(){return'w+'});c=1};while(c­­) {if(k[c]){p=p.replace(new RegExp('b'+e(c)+'b','g'),k[c])}}return p}('u  1={5:2.f=='t s r',h:2.j(),4:2.f=='k',3:2.l.m(),n:7(2.d.o(p))|| 7(2.d),q:2.g=='i'}1. b=1.3.6('b')>=0;a(1.3.6('c')>=0) {1.5=1.4=9;1.c=e}a(1.3.6('8')>=0){1.5= 1.4=9;1.8=e}',31,31,'|is|navigator|ua|ns|ie....
  • 33. Distribution • If you develop an interesting piece of code and wish to let the world use it however they wish, you can use service such as the JavaScript Archive Network (JSAN) - http://openjsan.org/ • If you create a plugin on a certain library such as jQuery, you can use the plugin repository that jQuery provided
  • 34. Q&A
  • 35. Reference • Pro JavaScript Techniques, John Resig, Apress